const { Sequelize, sequelize } = require('./sequelize');

const Course = sequelize.define('Course', {
  cId: {
    type: Sequelize.INTEGER,
    allowNull: false,
    primaryKey: true,
    unique: true,
  },
  cTitle: {
    type: Sequelize.STRING,
    allowNull: false,
  },
  cHours: {
    type: Sequelize.INTEGER,
    allowNull: false,
  },
  taughtClass: {
    type: Sequelize.STRING,
  },
  teachingDepartment: {
    type: Sequelize.STRING,
  },
  teachingSemester: {
    type: Sequelize.STRING,
  },
  totalNumber: {
    type: Sequelize.INTEGER,
  },
  ecNumber: {
    type: Sequelize.INTEGER,
  },
  ecIds: {
    type: Sequelize.STRING,
  },
  tIds: {
    type: Sequelize.STRING,
  },
  cIsArranged: {
    type: Sequelize.STRING,
  },
}, {
  modelName: 'Course',
  tableName: 'course',
  timestamps: false,
});

module.exports = {
  Course
};
